<%--
    Date: 2024-05-22
    学生主页，显示学生的基本信息和功能入口。
    studentHome.jsp
    ├── 查看成绩 --> studentGrades.jsp
    ├── 修改个人信息 --> editUserInfo.jsp
    └── 提出成绩修改申请 --> studentGradeRequest.jsp
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>学生主页</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/bootstrap.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery-3.7.1.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/updateTime.js"></script>
    <style>
        body {
            background: url('${pageContext.request.contextPath}/resources/img/bg-HYL.jpg') no-repeat center center fixed;
            background-size: cover;
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            position: relative;
        }
        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.8);
            z-index: 1;
        }
        .main-container {
            position: relative;
            z-index: 2;
            background-color: rgba(255, 255, 255, 0.9);
            padding: 20px;
            border-radius: 8px;
            margin-top: 80px;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .top-bar {
            background-color: #112d4e;
            color: white;
            text-align: center;
            padding: 10px 0;
            position: fixed;
            width: 100%;
            z-index: 3;
            top: 0;
        }
        .top-bar span {
            display: block;
        }
        .content {
            display: flex;
            width: 100%;
            justify-content: space-between;
            align-items: stretch;
        }
        .info, .nav {
            flex: 1;
            padding: 20px;
            background-color: #f9f7f7;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            margin: 10px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .info p {
            margin: 0;
            padding: 5px 0;
            font-weight: bold;
            font-size: 1.1em;
        }
        .nav {
            align-items: center;
        }
        .nav a {
            display: block;
            margin: 10px 0;
            padding: 10px 20px;
            background-color: #3f72af;
            color: white;
            border-radius: 4px;
            text-decoration: none;
            transition: background-color 0.3s;
            text-align: center;
            width: 200px; /* 固定宽度 */
        }
        .nav a:hover {
            background-color: #2f5b8f;
        }
    </style>
</head>
<body>
<div class="overlay"></div>
<div class="top-bar">
    <span id="currentTime"></span>
</div>
<div class="main-container">
    <div class="content">
        <div class="info">
            <h2>欢迎您, ${student.username}同学！</h2>
            <p>学生ID: ${student.userId}</p>
        </div>
        <div class="nav">
            <a href="${pageContext.request.contextPath}/editUserInfo">修改个人信息</a>
            <a href="${pageContext.request.contextPath}/student/${student.userId}">查看个人成绩</a>
            <a href="${pageContext.request.contextPath}/student/request">提出成绩修改申请</a>
        </div>
    </div>
</div>
</body>
</html>
